//
//  HBTagWaterCollectionReusableView.m
//  HBLibary_Example
//
//  Created by Rambo on 2018/6/19.
//  Copyright © 2018年 Rambo. All rights reserved.
//

#import "HBTagWaterCollectionReusableView.h"

@interface HBTagWaterCollectionReusableView ()
@property (nonatomic, strong) UILabel *titleLabel;
@end

@implementation HBTagWaterCollectionReusableView

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self setUI];
    }
    return self;
}

#pragma mark - set

- (void)setTitle:(NSString *)title{
    _title = title;
    self.titleLabel.text = _title;
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.titleLabel.frame = self.bounds;
}

#pragma mark - 初始化

- (void)setUI{
    UIView *superView = self;
    
    self.titleLabel = ({
        UILabel *label = [[UILabel alloc] init];
        label.textColor = [UIColor blackColor];
        label.font = [UIFont systemFontOfSize:14];
        [superView addSubview:label];
//        [label mas_makeConstraints:^(MASConstraintMaker *make) {
//            make.left.equalTo(superView).offset(15);
//            make.right.equalTo(superView).offset(-15);
//            make.centerY.equalTo(superView);
//        }];
        label;
    });

}

@end
